//
//  ioiter1.cpp
//  Demo
//
//  Created by zhang on 14-5-29.
//  Copyright (c) 2014年 zhang. All rights reserved.
//
#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
using namespace std;

int main()
{
    vector<string> col1;
    copy(istream_iterator<string>(cin),
         istream_iterator<string>(),
         back_inserter(col1));
    
    // sort elements
    sort(col1.begin(),col1.end());
    
    /* print all elements without duplicates
     * - source: col1
     * - destination: standard output (with newline between elements)
     */
    unique_copy(col1.begin(), col1.end(), ostream_iterator<string>(cout,"\n"));
    return 0;

}
